import React, { Component } from 'react'
import { Route , HashRouter} from 'react-router-dom'
import { CacheSwitch } from 'react-router-cache-route'
import Home from './pages/home/home'
import Index from './pages/index/index'
import Course from './pages/course/course'
import Courseinfo from './pages/courseinfo/courseinfo'
import About from './pages/about/about'
import expert from './pages/expert/expert'
import activity from './pages/activity/activity'
import activityinfo from './pages/activityinfo/activityinfo'
import signup from './pages/signup/signup'
import signupinfo from './pages/signupinfo/signupinfo'
import download from './pages/download/download'

import Login from './pages/login/login'
import Register from './pages/register/register'

import Main from './pages/main/main'
import User from './pages/user/user'
import usercenter from './pages/usercenter/usercenter'
import mynews from './pages/mynews/mynews'
import myorder from './pages/myorder/myorder'
import coursebasket from './pages/coursebasket/coursebasket'
import mycourse from './pages/mycourse/mycourse'
import mysubscribe from './pages/mysubscribe/mysubscribe'
import mynote from './pages/mynote/mynote'
import mytest from './pages/mytest/mytest'
import mycertificate from './pages/mycertificate/mycertificate'


import teacher from './pages/teacher/teacher'
import teacherinfo from './pages/teacherinfo/teacherinfo'
import school from './pages/school/school'
import notice from './pages/notice/notice'
import policies from './pages/policies/policies'
import help from './pages/help/help'
import live from './pages/live/live'
import liveroom from './pages/liveroom/liveroom'
import liveinfo from './pages/liveinfo/liveinfo'
import basket from './pages/basket/basket'
import study from './pages/study/study'
import exam from './pages/exam/exam'
import pay from './pages/pay/pay'
import honor from './pages/honor/honor'
import honorinfo from './pages/honorinfo/honorinfo'
import search from './pages/search/search'

import productSignup from './pages/productSignup/productSignup'
import news from './pages/news/news'
import newsinfo from './pages/newsinfo/newsinfo'
import works from './pages/works/works'
import workinfo from './pages/workinfo/workinfo'
import uploadwork from './pages/uploadwork/uploadwork'
import myactivity from './pages/myactivity/myactivity'
import myworks from './pages/myworks/myworks'


export default class router extends Component {
  render() {
    return (
      <HashRouter>
          <CacheSwitch>
            <Route exact path='/' component={Home}></Route>
            <Route exact path='/index' component={Index}></Route>
            <Route exact path='/login' component={Login}></Route>
            <Route exact path='/register' component={Register}></Route>
            <Route exact path='/home' component={Home}></Route>
            <Route exact path='/course' component={Course}></Route>
            <Route exact path='/expert' component={expert}></Route>
            <Route exact path='/activity' component={activity}></Route>
            <Route exact path='/activityinfo' component={activityinfo}></Route>
            <Route exact path='/signup' component={signup}></Route>
            <Route exact path='/signupinfo' component={signupinfo}></Route>
            <Route exact path='/download' component={download}></Route>

            <Route exact path='/courseinfo' component={Courseinfo}></Route>
            <Route exact path='/about' component={About}></Route>
            <Route exact path='/teacher' component={teacher}></Route>
            <Route exact path='/teacherinfo' component={teacherinfo}></Route>
            <Route exact path='/school' component={school}></Route>
            <Route exact path='/notice' component={notice}></Route>
            <Route exact path='/policies' component={policies}></Route>
            <Route exact path='/help' component={help}></Route>
            <Route exact path='/live' component={live}></Route>
            <Route exact path='/liveroom' component={liveroom}></Route>
            <Route exact path='/liveinfo' component={liveinfo}></Route>
            <Route exact path='/basket' component={basket}></Route>
            <Route exact path='/study' component={study}></Route>
            <Route exact path='/exam' component={exam}></Route>
            <Route exact path='/pay' component={pay}></Route>
            <Route exact path='/honor' component={honor}></Route>
            <Route exact path='/honorinfo' component={honorinfo}></Route>
            <Route exact path='/search' component={search}></Route>

            <Route exact path='/productSignup' component={productSignup}></Route>
            <Route exact path='/news' component={news}></Route>
            <Route exact path='/newsinfo' component={newsinfo}></Route>
            <Route exact path='/works' component={works}></Route>
            <Route exact path='/workinfo' component={workinfo}></Route>
            <Route exact path='/uploadwork' component={uploadwork}></Route>
            
            <Main>
              <Route exact path='/user' component={User}></Route>
              <Route exact path='/usercenter' component={usercenter}></Route>
              <Route exact path='/mynews' component={mynews}></Route>
              <Route exact path='/myorder' component={myorder}></Route>
              <Route exact path='/coursebasket' component={coursebasket}></Route>
              <Route exact path='/mycourse' component={mycourse}></Route>
              <Route exact path='/mysubscribe' component={mysubscribe}></Route>
              <Route exact path='/mynote' component={mynote}></Route>
              <Route exact path='/mytest' component={mytest}></Route>
              <Route exact path='/mycertificate' component={mycertificate}></Route>
              <Route exact path='/myactivity' component={myactivity}></Route>
              <Route exact path='/myworks' component={myworks}></Route>
            </Main>
          </CacheSwitch>
      </HashRouter>
    )
  }
}
